package com.itsense.stock.mapper;

import com.itsense.stock.pojo.domain.PermissionTreeDomain;
import com.itsense.stock.pojo.entity.SysPermission;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.Map;
import java.util.List;

/**
* @author sense
* @description 针对表【sys_permission(权限表（菜单）)】的数据库操作Mapper
* @createDate 2024-12-30 20:59:30
* @Entity com.itsense.stock.pojo.entity.SysPermission
*/
public interface SysPermissionMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysPermission record);

    int insertSelective(SysPermission record);

    SysPermission selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysPermission record);

    int updateByPrimaryKey(SysPermission record);

    /**
     * 通过id返回menu里面的数据
     * @param id
     * @return
     */
    List<Map<String, Object>> getLoginMenu(@Param("id") String id);

    /**
     * 返回查看权限集合
     * @return
     */
    List<SysPermission> getPermission();

    /**
     * 获取全部权限信息
     * @return
     */
    List<PermissionTreeDomain> getPermissionTree();

    /**
     * 返回全部权限信息
     * @return
     */
    List<SysPermission> selectAll();
}
